/*
 * MInput测试类
 * and open the template in the editor.
 */
package org.vacoor.ui.qq.input;

import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

import org.vacoor.ui.qq.combobox.demo.ComDemo;
import org.vacoor.ui.qq.combobox.demo.ComDemoFromFile;
import org.vacoor.ui.qq.password.Demo;


/**
 *
 * @author Vacoor
 */
public class QQLoginInputDemo {

    public static void main(String[] args) {
        try {
//            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
        }
        JFrame frame = new JFrame("MInput'Test");
        JPanel panel = new JPanel();
        JButton buttonCom = new JButton("Com'Test");
        JButton buttonCom2 = new JButton("Com'Test 2");
        JButton buttonPass = new JButton("Pass'Test");
        buttonCom.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                new ComDemo();
            }
        });
        
        buttonCom2.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                new ComDemoFromFile();
            }
        });        

        buttonPass.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                new Demo();
            }
        });

        panel.setLayout(new GridBagLayout());
        panel.setBackground(Color.WHITE);

        panel.add(QQLoginInput.createMInput(), new GridBagConstraints(0, 0, 2, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.CENTER, new Insets(10, 10, 10, 10), 1, 1));
        panel.add(buttonCom, new GridBagConstraints(0, 1, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(2, 10, 10, 5), 1, 1));
        panel.add(buttonPass, new GridBagConstraints(1, 1, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(2, 5, 10, 10), 1, 1));

        frame.add(panel);
//        frame.setUndecorated(true);

        frame.setVisible(true);
        frame.pack();
//        frame.setAlwaysOnTop(true);
//        frame.setSize(300,200);
        frame.setDefaultCloseOperation(3);
        frame.setLocationRelativeTo(null);
    }
}
